<template>
  <div class="home-wp">
    <div class="list">
      <router-link v-for="(item, index) in list" :key="index"
        class="item"
        :to="item.url">
        {{index+1}}. {{item.name}}
      </router-link>
    </div>
    <span class="middle"></span>
  </div>
</template>

<script>

export default {
  name: 'home',
  data () {
    return {
      list: [
        {name: 'readme使用规范', url: '/readme'},
        {name: '滚动插件', url: '/t-scrollbar'},
        {name: '使用Export2Excel下载Excel文件', url: '/e2e_down'},
        {name: '弹窗', url: '/comdialog'},
      ]
    }
  }
}
</script>
<style lang="scss" scoped>
.home-wp {
  position: relative;
  padding: 80px;
  background: #F6F6F6;
  min-height: 100vh;
  overflow: auto;
  box-sizing: border-box;
  &:before, &:after {
    content: '';
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    width: 310px;
  }
  &:before {
    left: 0;
    background: url(../assets/image/left.jpg) no-repeat center top;
    background-size: 100% auto;
  }
  &:after {
    right: 0;
    background: url(../assets/image/right.jpg) no-repeat center bottom;
    background-size: 100% auto;
  }

  .list {
    position:relative;
    z-index: 2;
    box-sizing: border-box;
    &:after {
      content: '';
      display: block;
      clear: both;
    }
    .item {
      float: left;
      width: 33%;
      margin-bottom: 10px;
      padding-right: 20px;
      box-sizing: border-box;
    }
  }
}

@media screen and (max-width: 900px) {
  .home-wp {
    .list {
      .item {
        width: 50%;
      }
    }
  }
}
@media screen and (max-width: 500px) {
  .home-wp {
    padding: 40px;
    &:before, &:after {
      width: 120px;
    }
    .list {
      .item {
        width: 100%;
      }
    }
  }
}
</style>
